From 68d2000111ae1564173771604e42e0e06cda6321 Mon Sep 17 00:00:00 2001 From: Keir Fraser Date: Mon, 31 Mar 2008 18:05:18 +0100 Subject: [PATCH] Constrain the checks for GCC/ANSI to just those header files that require it. Signed-off-by: Keir Fraser --- xen/include/public/arch-ia64.h | 4 ++++ xen/include/public/hvm/save.h | 4 ++++ xen/include/public/xen-compat.h | 4 ---- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/xen/include/public/arch-ia64.h b/xen/include/public/arch-ia64.h index 9a1b672004..43ca979cf6 100644 --- a/xen/include/public/arch-ia64.h +++ b/xen/include/public/arch-ia64.h @@ -28,6 +28,10 @@ #ifndef __HYPERVISOR_IF_IA64_H__ #define __HYPERVISOR_IF_IA64_H__ +#if !defined(__GNUC__) || defined(__STRICT_ANSI__) +#error "Anonymous structs/unions are a GNU extension." +#endif + /* Structural guest handles introduced in 0x00030201. */ #if __XEN_INTERFACE_VERSION__ >= 0x00030201 #define ___DEFINE_XEN_GUEST_HANDLE(name, type) \ diff --git a/xen/include/public/hvm/save.h b/xen/include/public/hvm/save.h index 3ffe182a50..d45f0c1115 100644 --- a/xen/include/public/hvm/save.h +++ b/xen/include/public/hvm/save.h @@ -39,6 +39,10 @@ * Internal mechanisms should be kept in Xen-private headers. */ +#if !defined(__GNUC__) || defined(__STRICT_ANSI__) +#error "Anonymous structs/unions are a GNU extension." +#endif + /* * Each entry is preceded by a descriptor giving its type and length */ diff --git a/xen/include/public/xen-compat.h b/xen/include/public/xen-compat.h index 3514943d82..c2894990cd 100644 --- a/xen/include/public/xen-compat.h +++ b/xen/include/public/xen-compat.h @@ -41,8 +41,4 @@ #error "These header files do not support the requested interface version." #endif -#if defined(__GNUC__) && defined(__STRICT_ANSI__) -#error "These headers files use GNU extensions when built with GCC." -#endif - #endif /* __XEN_PUBLIC_XEN_COMPAT_H__ */ -- 2.30.2